package thread;

import java.io.File;

public class Demo47 {
    public static void main(String[] args) {
        //通过重命名去移动文件
        File file = new File("./src/test");
        File newFile = new File("./test.txt");
        file.renameTo(newFile);
    }
}
